//
//  GYLeftCell.m
//  GoodLuck
//
//  Created by apple on 2018/2/28.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYLeftCell.h"

@interface GYLeftCell ()
@property (weak, nonatomic) IBOutlet UIImageView *categoryImageView;

@end
@implementation GYLeftCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.signLable.font = [UIFont systemFontOfSize:widthScale(16, iphone6_W)];
}

- (void)setModel:(GYlargeCategory *)model {
    _model = model;
    
    [self.categoryImageView sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:[UIImage imageNamed:@"4"]];
    if (model.isSelect) {
        self.signLable.textColor = RGBColor(15, 206, 194);
        self.markLable.backgroundColor = RGBColor(15, 206, 194);
    }else {
        self.markLable.backgroundColor = RGBColor(240, 240, 240);
        self.signLable.textColor = RGBColor(154, 154, 154);
    }
}

- (CGFloat)getHeight:(GYlargeCategory *)largeModel {
    self.model = largeModel;
    
    [self layoutIfNeeded];
    
    return CGRectGetMaxY(self.markLable.frame);
}
@end
